<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<meta name="decorator" content="moduleView"/>
	<script type="text/javascript">
	function insertToContract(){
		var intentId= $("#intentId").attr("value");
		var contract_Type =$("#contract_Type").attr("value");
		Oosp_Loading('正在导入到合同，请稍等...');
		
		$.get("${contextPath}/biz/intent/"+contract_Type+"/"+intentId+"/insertToContract",function(data){
			var obj = eval('(' + data + ')');
			if(obj.success){
				top.$.jBox.tip('导入到合同成功，请进入合同查看页面查看！', 'success');
				window.location.reload();//刷新当前页面
				
			}else{
				top.$.jBox.tip('导入到合同失败！');
			
			}
		});
	}
	</script>
</head>
<body>
<div class="Report_f">
		<div class="Report_f_1">
			<div class="Report_f_title_1">先申号信息</div>
		  <ul class="nav nav-tabs Report_f_title_2" id="myTab">
			  <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
			    <li><a href="#workflow" data-toggle="tab">流程审批</a></li> 
			  <li><a href="#diagram" data-toggle="tab">流程图</a></li>
			</ul> 
			<div class="tab-content Report_f_title_3">
			<input type="hidden" id="contract_Type" value="${contract_Type}">
			<input type="hidden" id="intentId" value="${intSalesno.intAssociated.id}">
			  <div class="tab-pane active" id="home">
			 	 <div class="Report_f_title_4">
			 	 	<div class="f_2">
							<div class="col-sm-6">
							    <label for="intentNo" class="col-sm-4 f_4">新签意向单号:</label>
								<div class="col-sm-8">
									${intSalesno.intentNo}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="purchaseBy" class="col-sm-4 f_4">采购申请人:</label>
								<div class="col-sm-8">
									${purchaseByName}
								</div>
						 	</div>
						</div> 
				  	<div class="f_2">
							<div class="col-sm-6">
							    <label for="area" class="col-sm-4 f_4">区域:</label>
								<div class="col-sm-8">
									${intSalesno.areaId}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="store" class="col-sm-4 f_4">门店:</label>
								<div class="col-sm-8">
								
									${intSalesno.store}
								</div>
						 	</div>
						</div>
					<div class="f_2">
							<div class="col-sm-6">
							    <label for="floor" class="col-sm-4 f_4">楼层:</label>
								<div class="col-sm-8">
									${intSalesno.floor}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="entryDate" class="col-sm-4 f_4">进场日期</label>
								<div class="col-sm-8">
									 <fmt:formatDate value="${intSalesno.entryDate}" pattern="yyyy-MM-dd"/>
								</div>
						 	</div>
						</div> 
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="supplierName" class="col-sm-4 f_4">供应商名称:</label>
								<div class="col-sm-8">
									
									${intSalesno.supplierName}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="supplierNo" class="col-sm-4 f_4">供应商编码:</label>
								<div class="col-sm-8">
									${intSalesno.supplierNo}
								</div>
						 	</div>
						</div> 
						<div class="f_2">
							<label for="reasons" class="col-sm-2 f_4">先申号原因:</label>
							<div class="col-sm-10">
								
									<textarea rows="5" cols="120" class="form" readonly="readonly">${intSalesno.reasons}</textarea>
								
							</div>
						</div> 
							    <h4>合同目前状态</h4>
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="isLargeAdjust" class="col-sm-4 f_4">属于公司大型调整:</label>
								<div class="col-sm-8">
									<ossp:radio name="isLargeAdjust" id="isLargeAdjust" dictType="YESORNO" 
								defaultChecked="${intSalesno.isLargeAdjust}" ></ossp:radio>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="intentFinishTime" class="col-sm-4 f_4">意向批复时间:</label>
						 		<div class="col-sm-8">
									<fmt:formatDate value="${intSalesno.intentFinishTime}" pattern="yyyy-MM-dd"/>
								</div>
								</div>
						</div> 
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="feesPayTime" class="col-sm-4 f_4">费用缴纳时间:</label>
								<div class="col-sm-8">
									 <fmt:formatDate value="${intSalesno.feesPayTime}" pattern="yyyy-MM-dd"/>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="paperReturnTime" class="col-sm-4 f_4">合同文本返回时间:</label>
								<div class="col-sm-8">
									 <fmt:formatDate value="${intSalesno.paperReturnTime}" pattern="yyyy-MM-dd"/>
								</div>
						 	</div>
						</div> 
						<div class="f_2">
						<div class="col-sm-6">
							<label for="isContractAct" class="col-sm-4 f_4">合同文本是否已成立:</label>
							<div class="col-sm-8">
									<ossp:radio name="isContractAct" id="isContractAct" dictType="isTrue" 
								defaultChecked="${intSalesno.isContractAct}" ></ossp:radio>
								</div>
							
						</div> 
						</div> 
						 <div class="f_2">
							<label  class="col-sm-2 f_4">采购担保书:</label>
							<div class="col-sm-10">
								1.若供应商未能按本人承诺缴纳费用,本人承诺可从本人工资中扣除,直至供应商缴纳为止;<br>
								2.若合同未能按本人承诺返回,本人承诺可扣罚本人当月20%绩效工资;<br>
								3.若今后因无合同导致公司利益受损,如欠款无法追缴等,本人承诺承担一切经济责任和法律后果;
							</div>
						</div> 
						<div class="f_2">
							<div class="col-sm-6">
							    <label class="col-sm-4 f_4"></label>
								<div class="col-sm-8">
									
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="guarantor" class="col-sm-4 f_4">担保人:</label>
								<div class="col-sm-8">
									${guarantorByName}
									
								</div>
						 	</div>
						</div> 
						<div class="f_2">
							<label for="remarks" class="col-sm-2 f_4">备注:</label>
							<div class="col-sm-10">
								<textarea id="remarks" path="remarks" htmlEscape="false" rows="4" class="form-control f_11"></textarea>
							</div>
						</div> 
						<div class="f_2">
						 	<div class="col-sm-6">
							    <label for="createBy" class="col-sm-4 f_4">创建人:</label>
								<div class="col-sm-8">
										${createByName}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="createTime" class="col-sm-4 f_4">创建时间:</label>
								<div class="col-sm-8">
									<fmt:formatDate value="${intSalesno.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
								</div>
						 	</div>
						</div>
						<div class="f_2">
						 	<div class="col-sm-6">
							    <label for="updateBy" class="col-sm-4 f_4">修改人:</label>
								<div class="col-sm-8">
								${updateByName}
								
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="updateTime" class="col-sm-4 f_4">修改时间:</label>
								<div class="col-sm-8">
 									<fmt:formatDate value="${intSalesno.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
								</div>
						 	</div>
						</div>
					</div>
				 	<div class="o-l-search-builder f_1">
				 	  
				    	<a class="btn btn-danger btn_3 btn_right" role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
				  
				    	<c:if test="${intSalesno.status=='00'}">
				    	<shiro:hasPermission name="com.maoye.ossp.biz.contract.intent.IntSalesno:update">
				    		<a class="btn btn-info btn_3 btn_right" role="button" href="${contextPath}/biz/intent/intSalesno/${intSalesno.id}/edit?navId=${navId}&pageNo=${page.pageNo}">修改</a>
				    	</shiro:hasPermission>
				    	</c:if> 
				    		<c:if test="${!intSalesno.intAssociated.isCreateContract =='1'}">
				    			<a class="btn btn-info btn_3 btn_right" role="button" id="insertToContract" onclick="insertToContract()">导入到合同</a>
				    		</c:if>
					</div>
				</div>	
				<div class="tab-pane" id="workflow"> 
						<c:import url="/WEB-INF/views/bpm/workflow/workFlowInfo_view.jsp">
							<c:param name="formName" value="com.maoye.ossp.biz.intent.entity.IntSalesno" />
							<c:param name="flowKey" value="intSalesno" />
							<c:param name="businessId" value="${intSalesno.id}"/>
							<c:param name="method" value="${method}"/>
						</c:import> 	
					</div>
					<div class="tab-pane" id="diagram" style="overflow-x:auto;">
						<iframe id="diagram_iframe" scrolling="no" frameborder=0 width="100%">
						</iframe>		
					</div>
		
		</div>	
	  </div> 
	</div>
</body>
</html>